#ifndef __SANGAME_HISTORY_INDICATOR_ARBITRAGE_H__
#define __SANGAME_HISTORY_INDICATOR_ARBITRAGE_H__

#include "HistoryIndicatorBase.h"
#include "HistoryData.h"

class CHistoryIndicatorArbitrage : public CHistoryIndicatorBase {
public:
	CHistoryIndicatorArbitrage(SGHandle owner_handle);
	~CHistoryIndicatorArbitrage();

#pragma region SG Message

	BOOL OnSGInitContext(SGContext* context_param);
	BOOL OnSGGoodsChange(SGGoodsChange* goods_change_param);
	BOOL OnSGSyncData(SGRange<uint64_t>* range_param);
	BOOL OnSGDrawBack(SGCanvas* canvas_param);
	BOOL OnSGDrawFore(SGCanvas* canvas_param);

#pragma endregion SG Message

#pragma region SG Event

	void OnDataUpdate();

#pragma endregion SG Event

private:
	int m_nArbitrageGoods;
	int m_nArbitrageType;
	int m_nArbitrageCalcType;
	std::shared_ptr<CHistoryData> m_pData;
	std::shared_ptr<CHistoryData> m_pArbitrageData;

};

#endif // __SANGAME_HISTORY_INDICATOR_ARBITRAGE_H__